<!DOCTYPE html>
{% block content %}
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>

<body>
    <form action="/add/" method="post">
         {% csrf_token %}
        <table>
            <tbody>
             <tr>
                    <td>新增:</td>
                </tr>
                <tr>
                    <td>appid:<input type="text" name="id"></td>
                    <td>地址:<input type="text" name="addr"></td>
                    <td>支付方式:<input type="text" name="zhifu"></td>
                    <td><p><input type="checkbox" name="aspectRatio" value="0" /> 横屏</p>
                    <td><p><input type="checkbox" name="h5switch" value="0" /> 正在审核中</p>
                    </td>
                </tr>
            </tbody>
        </table><input type="submit" value="提交">
    </form>
    <table>
        <tbody>
            <tr>
                <th>版本号</th>
                <th>地址</th>
                <th>支付方式</th>
                <th>屏幕</th>
                <th>状态</th>
                <th>操作</th>
            </tr>
            {% if posts_list %}
            {% for post in posts_list %}
            <tr>
                <td>{{post.id  }}</td>
                <td>{{ post.addr }}</td>
                <td>{{ post.zhifu }}</td>
                {% ifnotequal '0' post.aspectRatio %}
                <td>竖屏</td>
                {% endifnotequal %}
                {% ifequal '0' post.aspectRatio %}
                 <td>横屏</td>
                {% endifequal %}
                {% ifnotequal '0' post.h5switch %}
                <td>未在审核</td>
                {% endifnotequal %}
                {% ifequal '0' post.h5switch %}
                 <td>正在审核中</td>
                {% endifequal %}
                <td> <a href="/editItem/?appid={{post.id}}">更改</a></td>
                <td></td>
            </tr>
          {% endfor %}
            {% endif %}
        </tbody>
    </table>
     <table>
        <tbody>
          <a href="/logout/">退出登录</a>
        </tbody>
    </table>
</body>

</html>
{% endblock %}